/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package db.connectionPool;

/**
 *
 * @author Kossel
 */
public class DBConfiguration {

 //  private String url ="jdbc:mysql://localhost:3306/arqsw";
   private int numConnections;
   private String dbUser;
   private String dbPass;
   private String host;
   private String dbPort;
   private String dbSchema;
   private String driver;
   private String stream;
   private String serverName;


   public DBConfiguration(){}

    /**
     * @return the dbUser
     */
    public String getDbUser() {
        return dbUser;
    }

    /**
     * @param dbUser the dbUser to set
     */
    public void setDbUser(String dbUser) {
        this.dbUser = dbUser;
    }

    /**
     * @return the dbPass
     */
    public String getDbPass() {
        return dbPass;
    }

    /**
     * @param dbPass the dbPass to set
     */
    public void setDbPass(String dbPass) {
        this.dbPass = dbPass;
    }

    /**
     * @return the host
     */
    public String getHost() {
        return host;
    }

    /**
     * @param host the host to set
     */
    public void setHost(String host) {
        this.host = host;
    }

    /**
     * @return the dbPort
     */
    public String getDbPort() {
        return dbPort;
    }

    /**
     * @param dbPort the dbPort to set
     */
    public void setDbPort(String dbPort) {
        this.dbPort = dbPort;
    }

    /**
     * @return the dbSchema
     */
    public String getDbSchema() {
        return dbSchema;
    }

    /**
     * @param dbSchema the dbSchema to set
     */
    public void setDbSchema(String dbSchema) {
        this.dbSchema = dbSchema;
    }

    public String getURL (){
    //  private String url ="jdbc:mysql://localhost:3306/arqsw";
    String url = this.getStream()+this.getHost()+":"+this.getDbPort()+"/"+this.getDbSchema();
        return url;
    }

    /**
     * @return the driver
     */
    public String getDriver() {
        return driver;
    }

    /**
     * @param driver the driver to set
     */
    public void setDriver(String driver) {
        this.driver = driver;
    }

    /**
     * @return the stream
     */
    public String getStream() {
        return stream;
    }

    /**
     * @param stream the stream to set
     */
    public void setStream(String stream) {
        this.stream = stream;
    }

    /**
     * @return the numConnections
     */
    public int getNumConnections() {
        return numConnections;
    }

    /**
     * @param numConnections the numConnections to set
     */
    public void setNumConnections(int numConnections) {
        this.numConnections = numConnections;
    }

    @Override
    public String toString(){
        return this.getServerName()+" "+this.getURL()+"@"+this.getDbUser()+"@"+this.getDbPass()+"@"+this.getDriver();
    }

    /**
     * @return the dbName
     */
    public String getServerName() {
        return serverName;
    }

    /**
     * @param dbName the dbName to set
     */
    public void setServerName(String dbName) {
        this.serverName = dbName;
    }

}
